<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* <!-- 3、选择属性值开头的某些元素 --> */
        div[class^=icon] {
            color: #f2000c;
        }

        /* <!-- 4、选择属性值结尾的某些元素 --> */
        div[class$=fo] {
            color: #a4fc00;
        }
    </style>
</head>

<body>
    <!-- 3、选择属性值开头的某些元素 -->
    <div class="icon1">1</div>
    <div class="icon2">2</div>
    <div class="icon3">3</div>
    <div class="icon4">4</div>
    <div class="no">5</div>
    <br>
    <!-- 4、选择属性值结尾的某些元素 -->
    <div class="head1-fo">7</div>
    <div class="head2-fo">8</div>
    <div class="head3-fo">9</div>
    <div class="head-fo">0</div>
    <div class="h">d</div>
</body>

</html>